package com.sw.bbs.board.service;

import com.github.pagehelper.PageInfo;
import com.sw.bbs.board.vo.request.comment.InsertCommentRequest;
import com.sw.bbs.board.vo.request.comment.QueryCommentRequest;
import com.sw.bbs.board.vo.request.comment.UpdateCommentRequest;
import com.sw.bbs.common.common.ServiceException;

import javax.servlet.http.HttpServletRequest;

public interface CommentService {
    /**
     * 添加评论
     * @param record
     * @return
     * @throws Exception
     */
    int insert(InsertCommentRequest record, HttpServletRequest httpServletRequest) throws ServiceException;
    /**
     * 编辑评论
     * @param record
     * @return
     * @throws Exception
     */
    int edit(UpdateCommentRequest record, HttpServletRequest httpServletRequest) throws Exception;
    /**
     * 删除评论
     * @param commentId
     * @return
     * @throws Exception
     */
    int delete(Integer commentId, HttpServletRequest httpServletRequest) throws Exception;
    /**
     * 查询评论列表
     * @param queryCommentRequest
     * @return
     * @throws Exception
     */
    PageInfo queryCommentList(QueryCommentRequest queryCommentRequest) throws Exception;

}
